def monthly_payment(p: int, s: int, n: int) -> int:
    r = p / 100
    m = (s*r*(1+r)**n)/(12*(((1+r)**n)-1))
    m = int(m)
    print(m)
    return m

assert monthly_payment(5, 100000, 1) == 8749
assert monthly_payment(10, 200000, 3) == 6701
assert monthly_payment(25, 550000, 2) == 31828

assert monthly_payment(15, 100000, 5) == 2485
assert monthly_payment(33, 520000, 2) == 32897
assert monthly_payment(45, 250000, 1) == 30208